﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Wallpaper.Models.DTOs.WeChatLogin.Responses
{

    /// <summary>
    /// 微信API会话响应模型
    /// 对应微信jscode2session接口返回的数据结构
    /// </summary>
    /// <summary>
    /// 微信API会话响应模型
    /// 对应微信jscode2session接口返回的数据结构
    /// </summary>
    public class WeChatSessionResponse
    {
        /// <summary>
        /// 用户唯一标识
        /// </summary>
        [JsonPropertyName("openid")]
        public string OpenId { get; set; }

        /// <summary>
        /// 会话密钥
        /// </summary>
        [JsonPropertyName("session_key")]
        public string SessionKey { get; set; }

        /// <summary>
        /// 用户在微信开放平台的唯一标识符
        /// </summary>
        [JsonPropertyName("unionid")]
        public string UnionId { get; set; }

        /// <summary>
        /// 错误代码
        /// </summary>
        [JsonPropertyName("errcode")]
        public int ErrorCode { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonPropertyName("errmsg")]
        public string ErrorMessage { get; set; }
    }
}
